package com.woniuxy.reader.controller;

import com.woniuxy.reader.service.MainService;
import com.woniuxy.result.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 主页控制器
 * @author zh_o
 * @date 2020-10-15
 */
@Api("主页接口")
@RestController
@RequestMapping("/main")
public class MainController {

    @Autowired
    private MainService mainService;

    @GetMapping
    @ApiOperation("获取，主页初始化所需数据")
    public Object init() {
        return ResponseResult.success(mainService.init());
    }

}
